//用于用编辑器编辑测试步骤的窗体
var testDesignStepEditorWin = Ext.create('Ext.window.Window', {
	title:'编辑步骤',
    height: 430,
    width: 550,
    layout: 'fit',
    items: [testDesignStepEditorIFrame],
    closeAction: 'hide', // 防止窗体被销毁
    buttons: [{
		text: '确认',
		itemId: 'testDesignStepWinButton',
		listeners: [{
			click: function() {
				testDesignStepEditorIFrame.getFrame().contentWindow.postMessage({
			        status: 6,
			    }, zuulUrl + '/' + webEditorServiceName + '/index.html');//获取编辑器的内容
			}
		},{
			close: function(panel, eOpts) {//关闭窗口时要把监听移除
				testDesignListenFlag=false;
				window.removeEventListener('message', testDesignPutEditDataIntoGrid, false);//移除监听
			}
		}]
	}]
});

//用于给测试计划选择关联测试需求的窗体
var testDesignReqTreeGridWin=Ext.create('Ext.window.Window', {
	title:'选择关联测试需求',
    height: 430,
    width: 200,
    layout: 'fit',
    items: [testDesignReqTreePanel],
    closeAction: 'hide' // 防止窗体被销毁
});

//用于查看测试计划审核记录的批注的窗体
var testDesignCheckLogAnnotatoWin=Ext.create('Ext.window.Window', {
	title:'查看审核批注',
	height: 400,
    width: 800,
    layout: 'fit',
    items: [{
    	itemId:'testDesignCheckLogAnnotatoPanel'
    }],
    closeAction: 'hide' // 防止窗体被销毁
});

//用于测试设计转换成测试执行时提供主题、优先级选择的窗体
var testDesignTransformToRunWin=Ext.create('Ext.window.Window', {
	title:'转换测试执行',
	height: 250,
    width: 400,
    layout: 'fit',
    items: [testDesignTransformToRunForm],
    closeAction: 'hide', // 防止窗体被销毁
    buttons:[{
    	text:'确认',
    	listeners:[{
    		click:function(){
    			var item = testDesignLeftTree.getSelectionModel().getSelected();// 得到被选择的行的数组.
    			var id=item.items[0].data.id;
    			var testLab=testDesignTransformToRunForm.down('#testDesignToRunTreePicker').getValue();
    			var name=testDesignTransformToRunForm.down('#testDesignToRunTitle').getValue();
    			var priority=testDesignTransformToRunForm.down('#testDesignToRunPriority').getValue();
    			testDesignTransformToRun(id,name,testLab,priority);
    		}
    	}]
    }]
});